<div class="form-area" id="offer-form">
    <form action="/resume/offer/<#if (offer.id)??>${offer.id}/</#if>${behaviour}" method="post" id="form-offer">
        <input type="hidden" name="method" value="do"/>
        <input type="hidden" name="CSRFToken" value="${CSRFToken!""}"/>
        <table width="100%" class="dj-form-base">
            <colgroup>
                <col width="180">
                <col width="*">
            </colgroup>
            <tbody>
            <tr>
                <th><em>*</em>时间:</th>
                <td class="input">
                    <input type="text" reg="fun:$.formValidateFn.time,work,td" class="text year J_checkInput"
                           id="startdate-year" name="start" maxlength="4" value="${(offer.date?string('yyyy'))!}">

                    <span class="input">年</span>
                    <input type="text" class="text month" id="startdate-month" name="start" maxlength="2" value="${(offer.date?string('MM'))!}">
                    <span class="input">月</span>
                    <div style="display: none; " class="error">请填写正确的时间</div>
                </td>
            </tr>
            <tr>
                <th><em>*</em>类型:</th>
                <td class="input">
                    <input type="radio" id="type0-input" name="type" <#if (offer.type)?? && offer.type == 0>checked="checked"</#if> value="0" class="J_checkInput"><label for="type0-input" class="checkbox ">参加笔试</label></input>&nbsp;&nbsp;
                    <input type="radio" id="type1-input" name="type" <#if (offer.type)?? && offer.type == 1>checked="checked"</#if> value="1" class="J_checkInput"><label for="type1-input" class="checkbox ">参加面试</label></input>&nbsp;&nbsp;
                    <input type="radio" id="type2-input" name="type" <#if (offer.type)?? && offer.type == 2>checked="checked"</#if> value="2" class="J_checkInput"><label for="type2-input" class="checkbox ">拿到Offer</label></input>
                <@holder>
                    <script type="text/javascript">
                        function validateTypeRadio(){
                            return $('#type0-input').attr('checked')||$('#type1-input').attr('checked')||$('#type2-input').attr('checked');
                        }
                    </script>
                </@holder>
                    <div style="display: none; " class="error">请选择类型</div>
                </td>
            </tr>
            <tr>
                <th><em>*</em>公司名称:</th>
                <td class="input">
                    <div class="matchbox">
                        <div class="clearfix">
                            <input type="text" value="${(offer.corpName)!}" maxlength="80" name="corpName" class="text J_checkInput"
                                                     id="employer-input" autocomplete="off" reg="corpName">
                            <input type="hidden" id="employer-hidden" name="cid" value=""/>
                        </div>
                        <div class="pickpane" style="width: 224px; display: none;">
                            <ul class="menu"></ul>
                        </div>
                    </div>
                    <div style="display: none; " class="error">请填写正确的公司名称</div>
                    <script type="text/javascript">
                        $('#employer-input').matchbox({query: '/ajax/corp?s={1}', strict: false, statistic: true});
                    </script>

                </td>
            </tr>
            <tr>
                <th>职位名称:</th>
                <td style="position:relative;" class="input">
                    <div style="position:relative;">
                        <input type="text" value="${(offer.position)!}" maxlength="60" name="position" id="position-input" class="text">
                    </div>
                </td>
            </tr>
            <tr>
                <th>&nbsp;</th>
                <td class="input button">
                    <a href="javascript:void(0);"class="fresh formValidateSubmit margin"id="J_formSubmit" itemtype="offer"><span>保存</span></a><a href="javascript:void(0);" class="normal J_cancel" itemtype="offer"><span>取消</span></a>
                </td>
            </tr>
            </tbody>
        </table>
    </form>
</div>